Interview Questions and Answer
Options:
a. Delete the last element of the list
b. Add an element before the first element of the list
c. Delete the first element of the list
d. Inter change the first two elements of the list
Reveal Answer
Options:
a. for(ctr=1;x!=NULL;ctr++) x=x->fwd;
b. for(ctr=1;x!=NULL;ctr++) x=x->bwd;
c. for(ctr=1;x->fwd!=NULL;ctr++) x=x->fwd;
d. for(ctr=1;x->bwd!=NULL;ctr++) x=x->bwd;
Reveal Answer
Options:
a. for(ctr=1;x!=NULL;ctr++) x=x->fwd;
b. for(ctr=1;x!=NULL;ctr++) x=x->bwd;
c. for(ctr=1;x->fwd!=NULL;ctr++) x=x->fwd;
d. for(ctr=1;x->bwd!=NULL;ctr++) x=x->bwd;
Reveal Answer
Options:
a. X->bwd=start; X->fwd=start->fwd; Start->bwd->fwd=X; Start=X;
b. X->bwd=star->bwdt; X->fwd=start; Start->bwd-=X; Start=X;
c. X->bwd=start->bwd; X->fwd=start; Start->bwd->fwd=X; Start->bwd=x;
Reveal Answer
Bestdotnet google plus